Skip to content

Conversation

@hmstepanek
Copy link
Contributor

@hmstepanek hmstepanek commented Dec 13, 2025

Overview

  • Add fragmentation tracking metric for when we run out of space to add more nr.ids in compact mode.
  • Add nr.pg to entry span to track when a transaction is partial granularity.
  • Keep error attributes on partial granularity spans.
  • Only record partial granularity type supportability metric if partial granularity transactions are actually sent.
  • Small fixup to logic to make it more clear (not a==b => a!=b).
  • Fix bug in metric reporting for kept and instrumented.

@hmstepanek hmstepanek requested a review from a team as a code owner December 13, 2025 01:17
@hmstepanek hmstepanek changed the base branch from main to develop-hybrid-core-tracing December 13, 2025 01:17
@hmstepanek hmstepanek force-pushed the add-error-attr-support branch from 29ea8dd to dca5328 Compare December 13, 2025 01:18
@github-actions
Copy link

github-actions bot commented Dec 13, 2025

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 7 0 0 0.86s
✅ MARKDOWN markdownlint 7 0 0 0 1.26s
✅ PYTHON ruff 972 0 0 0 0.98s
✅ PYTHON ruff-format 972 0 0 0 0.36s
✅ YAML prettier 15 0 0 0 1.47s
✅ YAML v8r 15 0 0 5.96s
✅ YAML yamllint 15 0 0 0.73s

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security

@hmstepanek hmstepanek changed the title Keep error attributes on partial granularity spans. Add attributes to partial granularity spans & tracking metrics Dec 13, 2025
@hmstepanek hmstepanek changed the title Add attributes to partial granularity spans & tracking metrics Add attrs to partial gran spans & tracking metrics Dec 13, 2025
@mergify mergify bot added the tests-failing Tests failing in CI. label Dec 13, 2025
@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2025

Codecov Report

❌ Patch coverage is 92.98246% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop-hybrid-core-tracing@2eebf4f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
newrelic/core/node_mixin.py 95.45% 1 Missing and 1 partial ⚠️
newrelic/core/stats_engine.py 80.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##             develop-hybrid-core-tracing    #1608   +/-   ##
==============================================================
  Coverage                               ?   79.81%           
==============================================================
  Files                                  ?      213           
  Lines                                  ?    25105           
  Branches                               ?     3992           
==============================================================
  Hits                                   ?    20038           
  Misses                                 ?     3639           
  Partials                               ?     1428           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

# If the span is an exit span and we are in reduced mode (meaning no attribute dropping),
# just return the exit span as is.
if partial_granularity_type == "reduced":
ct_exit_spans["kept"] += 1
Copy link
Contributor Author

@hmstepanek hmstepanek Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a bug here that I fixed which is why this is here now. I had to move these into here because gets incremented multiple times if it's put in span_events because span_events loops over the children and then the children of the children (so it gets incremented multiple times each time is yields the node up the chain) where as here it is guaranteed that it is only incremented once.

@hmstepanek hmstepanek force-pushed the add-error-attr-support branch from 904321d to ed87ffa Compare December 19, 2025 22:21
@hmstepanek hmstepanek merged commit 48eecd9 into develop-hybrid-core-tracing Dec 24, 2025
43 of 61 checks passed
@hmstepanek hmstepanek deleted the add-error-attr-support branch December 24, 2025 00:01
@mergify mergify bot removed the tests-failing Tests failing in CI. label Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants